<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title><?=getValInArr(getSess(SESS_DIC),array('webInfo','webtitle'))?></title>
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
    <meta content="yes" name="apple-mobile-web-app-capable"/>
    <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
    <meta content="telephone=no" name="format-detection"/>
    <script src="<?php echo base_url().'public/home/js/' ?>jquery.js"></script>
    <?php include_once "public/home/html/bootstrap.php"  ?>
    <?php include_once "public/home/html/imgupload.php"  ?>
    <?php include_once "public/home/html/alert.php"  ?>   
    <script type="text/javascript" src="<?php echo base_url().'public/home/js/' ?>function.js"></script>
    <link rel="stylesheet" href="<?php echo base_url().'public/h_ui/lib/Hui-iconfont/1.0.8/' ?>iconfont.css">
    <link rel="stylesheet" href="<?php echo base_url().'public/home/css/' ?>mui.min.css">
    <?php include_once "public/home/html/alert.php"  ?>   
    <script type="text/javascript" src="<?php echo base_url().'public/home/js/' ?>function.js"></script>
    <!-- <script type="text/javascript" src="<?php echo base_url().'public/home/js/' ?>supervisor_feedback.js"></script> -->
    <link href="<?php echo base_url().'public/home/bootstrap-select/docs/docs/dist/css/'?>bootstrap-select.min.css" rel="stylesheet" />
    <script src="<?php echo base_url().'public/home/bootstrap-select/docs/docs/dist/js/'?>bootstrap-select.min.js"></script>
    <script src="<?php echo base_url().'public/home/bootstrap-select/docs/docs/dist/js/i18n/'?>defaults-zh_CN.min.js"></script>
</head>
<body>
    <style>
        body{
            padding: 3%;
            text-align: center;
            background-color: #ffffff;
        }
        #last_submit{
            margin-top: 15%;
            width:30%;
        }
        #next_submit{
            margin-top: 15%;
            width:30%;
        }
        .float_left{
            float:left;
        }
        .clear{
            clear:both;
        }
        
    </style>
    <input type="hidden" name='url' value="<?php echo base_url()?>">
    <input type="hidden" name='sub_role' value="<?php echo $_SESSION[SESS_USER_HOME]['role_id']?>">
    <input type="hidden" name='attend_id' value="<?php echo $attend_id?>">
    <input type="hidden" name='soure' value="<?php echo $soure?>">
    <div class="search-head header mui-bar mui-bar-nav row" style="background-color: #f7f9fa; border:none;">
        <div class="col-xs-1" style="margin-top: 3%">
            <a class=" Hui-iconfont Hui-iconfont-slider-left" href="javascript:void(0)" onclick="history.back();" style="color: #C9C9C9"></a>
        </div>
        <div class="col-xs-11">
            <h1 class="mui-title" style="color:#333;margin-left: -5%">听课评价</h1>
        </div>
    </div>
    <!-- <h3>信息反馈</h3> -->
    <div action="" class="form"  style='margin-top: 20%'> 
        <div>
            <div class="float_left">课程类型：</div>
            <div class="float_left" style='margin-left: 2%;margin-top: -2%;width: 200px'>
                 <select class="selectpicker ">
                   <?php foreach ($class_type as $k => $v): ?>
                    <option value='<?php echo $k+1 ?>' <?php if(isset($attends) && $v == estr($attends, 'class_type')) echo 'selected="selected"' ?>><?php echo $v ?></option>
                    <?php endforeach ?>
                    <!-- <option value='2'><?php echo $v ?></option>                  -->
                </select>
                <div class="clear"></div>
            </div>
            <div class="clear"></div>
        </div>
        <div style="margin-top: 50px;">
        <input class="btn btn-primary" id="last_submit" type="button" value="上一步">
        <input class="btn btn-primary" id="next_submit" type="button" value="下一步">
        </div>
    <script>    
        $(function(){
            // var selectpicker = $(".selectpicker option:selected").val();

            $("#next_submit").click(function(event) {
                var category=$(".selectpicker").val();
                var soure = $('input[name="soure"]').val();
                console.log(category);
                window.location.href =$('input[name="url"]').val()+ 'Home/Class_Assess/Index/'+soure+'/'+category+'/'+$('input[name="attend_id"]').val()+'?next=1';
                // window.Location.href= $('input[name="url"]').val()+ 'Home/Class_Assess/Index/'+category+'/0';
            });

            $("#last_submit").click(function(event) {
                var soure = $('input[name="soure"]').val();
                if(soure == 1){
                    window.location.href =$('input[name="url"]').val()+ 'Home/Index/evaluation';
                }else if(soure == 2){
                    window.location.href =$('input[name="url"]').val()+ 'Home/Class_Assess/SaveAssess';
                }else{
                    window.location.href =$('input[name="url"]').val()+ 'Home/Class_Assess/SubmittedAssess';
                }
               
                // window.Location.href= $('input[name="url"]').val()+ 'Home/Class_Assess/Index/'+category+'/0';
            });

           
            // $("#submit").click(function(){
            //     console.log(selectpicker);
            //     // window.Location.href=getRootPath()+ 'Home/Class_Assess/Index/'+selectpicker+'/0';
            // })
        })
    </script>
</body>
</html>
